package com.example.zluserservice.framework.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author zhenliu（孙凌岳）
 * @Description Ai
 * @Date 2025/6/22 10:31
 * @Version 1.0
 */
@Configuration
public class RedissonClientConfig {

    @Bean
    public RedissonClient redissonClient() {
        Config config = new Config();
        config.useSingleServer()
                .setAddress("redis://192.168.101.68:6379")
                .setPassword("redis")
                .setDatabase(1);

        return Redisson.create(config);
    }
}